package lexer;

import java.io.*;
import java.util.ArrayList;

/**
 * reads in a file line by line
 * 
 * @author Caroline
 *
 */

public class LogoReader {
	
	/**
	 * reads in all lines of a file, adding them to an arraylist
	 * 
	 * @param fileName
	 * @return arraylist of file lines
	 * @throws IOException
	 */
	public static ArrayList<String> readLines(String fileName) throws IOException {
		ArrayList<String> listOfLines = new ArrayList<String>();
		BufferedReader bufferedReader = null;
		
		String currentLine;
		bufferedReader = new BufferedReader(new FileReader(fileName));
		while ((currentLine = bufferedReader.readLine()) != null) {
			listOfLines.add(currentLine);
		}
		bufferedReader.close();

		return listOfLines;
	}
}
